package com.wavehi.dao.impl;

import com.alibaba.druid.filter.config.ConfigTools;

import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;

/**
 * @Author WaveHi
 * @Date 3/9/2021 下午 3:50
 * @Version 1.0
 * @Contact HJBWaveHi@163.com
 * @Description 获取数据库密码的加密形式
 */
public class GetPassword {
    public static void main(String[] args) throws Exception {
        String[] arr = ConfigTools.genKeyPair(512);
        System.out.println("privateKey:" + arr[0]);
        System.out.println("publicKey:" + arr[1]);
        System.out.println("password:" + ConfigTools.encrypt(arr[0],""));
    }
}
